// register character device
// #include <linux/fs.h>

static inline int register_chrdev(unsigned int major, const char *name,
          const struct file_operations *fops)
{
  return __register_chrdev(major, 0, 256, name, fops);
}

static inline void unregister_chrdev(unsigned int major, const char *name)
{
  __unregister_chrdev(major, 0, 256, name);
}


//  generate in  /proc/devices

// function analysis
/*
  1. major: the master device number 
  2. name: the device name
  3. fops: file opertions

  if want generate /dev/xx
  need :
      insmod xx.ko
      mknode /dev/xx c num 0
      
*/